import request from './request'

// 返现管理API
export const cashbackApi = {
  // 查询返现
  getCashbackList(data) {
    return request({
      url: '/cashback/find',
      method: 'post',
      data
    })
  },

  // 新增返现
  addCashback(data) {
    return request({
      url: '/cashback/insert',
      method: 'post',
      data
    })
  },

  // 删除返现
  deleteCashback(id) {
    return request({
      url: '/cashback/delete',
      method: 'delete',
      params: { id }
    })
  },

  // 修改返现
  updateCashback(data) {
    return request({
      url: '/cashback/update',
      method: 'put',
      data
    })
  }
}